package com.p2p.backend.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.p2p.base.dao.BaseMapper;

/**
 * leiwen@yiqihao.com
 */
public interface BackBankDao extends BaseMapper {

	@Select("select * from p2p_bank where status != 1")
	List<Map<String, Object>> listAll();

	void add(Map<String, Object> params);

	void update(Map<String, Object> params);

	@Update("update p2p_bank set status = 21 where id=#{id}")
	void pass(Integer id);

	@Update("update p2p_bank set status = 1 where id=#{id}")
	void unpass(Integer id);

	@Select("select * from p2p_bank where id=#{id}")
	Map<String, Object> get(Integer id);
}
